<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt'%>
<%@ taglib prefix='url' uri="/url-fun"%>
<%@ taglib prefix='kjb' uri="/common-fun"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<c:set var="category" value="${ categoryMap[cId] }"></c:set>
<title>${ category.name }灯饰大全_灯饰商城 家居灯饰网 装修家具灯饰_凯晶堡商城</title>
<meta name="keywords" content="灯饰大全,灯饰商城,凯晶堡灯饰" />
<c:choose>
	<c:when test="${category != null && category.description != ''  }">
		<meta name="description" content="${ category.description }" />
	</c:when>
	<c:otherwise>
		<meta name="description"
			content="网上买灯具就去凯晶堡商城：吸顶灯,吊灯,台灯,壁灯,庭院灯,落地灯,镜前灯,射灯,筒灯,小夜灯,橱柜灯,支架,日光灯等一应俱全，凯晶堡商城是中国最专业、最诚信的灯饰网上商城。凯晶堡商城提供安装案例参考、装修企业推荐及家居装饰知识." />
	</c:otherwise>
</c:choose>
<link href="http://www.kaijingbao.com/css/list.css?v=@version@" rel="stylesheet" type="text/css" />
</head>
<body>
	<!--#include virtual="/html/include/mainHeader.html"-->

	<div class="path">
		<a href="http://www.kaijingbao.com" target="_blank">首页</a> &gt; <a href="http://www.kaijingbao.com/so">所有商品</a>
		<c:if test="${ category != null  }">
					&gt; <a href="${ url:genSoUrl(category, null) }">${ category.name }</a>
		</c:if>
		<c:if test="${ ! empty keywords }">
					&gt; <c:out value="${ keywords }" escapeXml="true"></c:out>
		</c:if>
		
	</div>
	<div class="box1000">
		<div class="grid1000">
			<div class="choice">
				<c:if test="${ category == null  }">
					<dl>
						<dt title="灯饰分类">灯饰分类：</dt>
						<dd>
							<a class="${ category == null ?'this':'' }" href="http://www.kaijingbao.com/so" title="不限">不限</a>
							<c:forEach items="${ out.searchResult.facets['categoryId'] }" var="cmap">
								<c:if test="${ cmap.value > 0 }">
									<c:set var="c" value="${ categoryMap[kjb:parseLong(cmap.key)] }"></c:set>
									<a href="${ url:genSoUrl(c , keywords) }" title="${ c.name }">${ c.name }(<span>${ cmap.value }</span>)</a>
								</c:if>
							</c:forEach>
						</dd>
					</dl>
				</c:if>
				<c:if test="${ category != null  }">
					<c:forEach items="${ category.properties }" var="p">
						<dl class="Prop">
							<dt title="${ p.name }">${ p.name }：</dt>
							<dd>
								<c:set var="pId" >${ p.id }</c:set>
								<a class="this All" href="${ url:genFullSoUrl(category , keywords,properties,minPrice,maxPrice,sort,pId,null) }" title="不限">不限</a>
								<c:forEach items="${ kjb:stringSplit(p.propertyValues ,',')}" var="pv">
									<c:set var="key">${ p.id }_${ pv }</c:set>
									<a data-key="${ key }" href="${ url:genFullSoUrl(category , keywords,properties,minPrice,maxPrice,sort,key,null) }" title="${ pv }">${ pv }(<span>${out.searchResult.facets['properties'][key]  }</span>)</a>
								</c:forEach>
							</dd>
						</dl>
					</c:forEach>
				</c:if>
			</div>
		</div>
	</div>
	<div class="box1000">
		<div class="toolbox grid1000">
			<div class="sortTool">
				<ul>
					<li class="all ${ (empty sort ) ? 'this' : ''}"><a href="${ url:genFullSoUrl(category , keywords,properties,minPrice,maxPrice,'',null,null) }" title="默认排序">默认排序</a></li>
					<li class="count ${ ( sort=='s1' ) ? 'this' : ''}"><a href="${ url:genFullSoUrl(category , keywords,properties,minPrice,maxPrice,'s1',null,null) }" title="销售量">销售量</a></li>
					<li class="sortprice ${ ( sort=='s2' ) ? 'this' : ''}"><a href="${ url:genFullSoUrl(category , keywords,properties,minPrice,maxPrice,'s2',null,null) }" title="价格">价格</a></li>
					<li class="appraise ${ ( sort=='s3' ) ? 'this' : ''}"><a href="${ url:genFullSoUrl(category , keywords,properties,minPrice,maxPrice,'s3',null,null) }" title="评价数">评价数</a></li>
				</ul>
			</div>
			<form name="form1" method="get" action="${ url:genFullSoUrl(category , keywords , properties , minPrice , maxPrice , sort , null,null) }">
				<div class="priceBox">
					<div class="price">
						<div class="priceInput fl">
							<input type="text" value="${ minPrice > 0 ?  minPrice  : ''  }" class="txt" onafterpaste="this.value=this.value.replace(/\D/g,'')"
								onkeyup="this.value=this.value.replace(/\D/g,'')" name="p1" title="按价格区间筛选 最低价" autocomplete="off"> <span>-</span> <input
								type="text" value="${ maxPrice > 0 ?  maxPrice  : ''  }" class="txt" onafterpaste="this.value=this.value.replace(/\D/g,'')" onkeyup="this.value=this.value.replace(/\D/g,'')"
								name="p2" title="按价格区间筛选 最高价" autocomplete="off">
						</div>
						<div class="btns fl" style="display: none;">
							<span class="reset fl"><a href="${ url:genFullSoUrl(category , keywords , properties , 0 , 0 , sort , null,null) }">清空</a></span> <span class="btnsubmit">
								<button class="i" type="submit">确定</button>
							</span>
						</div>
					</div>
				</div>
			</form>
		</div>
	</div>
	<div class="box1000">
		<div class="grid1000 list">
				<div class="col col1">
					<c:forEach items="${ out.searchResult.list }" var="p" varStatus="vs">
					<c:if test="${ vs.index % 4 == 0  }">
						<div class="colTxt">
							<div class="img">
								<a href="${url:genProductUrl( p.id )}" target="_blank"><img class="lazy" src="http://www.kaijingbao.com/images/grey.gif" data-original='${kjb:genProductListPicUrl(p.id , p.picFilenames)}' width="230"  alt="${ p.name }" /></a>
							</div>
							<h4>
								<c:set var="highName" value="${ out.searchResult.highlighting[p.id]['name'][0]   }"></c:set>
								<a href="${url:genProductUrl( p.id )}" target="_blank">${ empty highName ? p.name : highName } </a>
							</h4>
							<ul>
								<li>市场价：<span>¥ <del>${ p.originalPrice}</del></span></li>
								<li>商城价：<b>¥${ p.price }<font>/件</font></b></li>
								<li>销售量：<i>${ p.salesNum  }件</i></li>
							</ul>
						</div>
					</c:if>
				</c:forEach>
			</div>
			
			<div class="col col2">
				
				<c:forEach items="${ out.searchResult.list }" var="p" varStatus="vs">
					<c:if test="${ vs.index % 4 == 1  }">
						<div class="colTxt">
							<div class="img">
								<a href="${url:genProductUrl( p.id )}" target="_blank"><img class="lazy" src="http://www.kaijingbao.com/images/grey.gif" data-original='${kjb:genProductListPicUrl(p.id , p.picFilenames)}' width="230"  alt="${ p.name }" /></a>
							</div>
							<h4>
								<c:set var="highName" value="${ out.searchResult.highlighting[p.id]['name'][0]   }"></c:set>
								<a href="${url:genProductUrl( p.id )}" target="_blank">${ empty highName ? p.name : highName } </a>
							</h4>
							<ul>
								<li>市场价：<span>¥ <del>${ p.originalPrice}</del></span></li>
								<li>商城价：<b>¥${ p.price }<font>/件</font></b></li>
								<li>销售量：<i>${ p.salesNum  }件</i></li>
							</ul>
						</div>
					</c:if>
				</c:forEach>
				
			</div>
			<div class="col col3">
				
				<c:forEach items="${ out.searchResult.list }" var="p" varStatus="vs">
					<c:if test="${ vs.index % 4 == 2  }">
						<div class="colTxt">
							<div class="img">
								<a href="${url:genProductUrl( p.id )}" target="_blank"><img class="lazy" src="http://www.kaijingbao.com/images/grey.gif" data-original='${kjb:genProductListPicUrl(p.id , p.picFilenames)}' width="230"  alt="${ p.name }" /></a>
							</div>
							<h4>
								<c:set var="highName" value="${ out.searchResult.highlighting[p.id]['name'][0]   }"></c:set>
								<a href="${url:genProductUrl( p.id )}" target="_blank">${ empty highName ? p.name : highName } </a>
							</h4>
							<ul>
								<li>市场价：<span>¥ <del>${ p.originalPrice}</del></span></li>
								<li>商城价：<b>¥${ p.price }<font>/件</font></b></li>
								<li>销售量：<i>${ p.salesNum  }件</i></li>
							</ul>
						</div>
					</c:if>
				</c:forEach>
			</div>
			<div class="col col4">
				
				<c:forEach items="${ out.searchResult.list }" var="p" varStatus="vs">
					<c:if test="${ vs.index % 4 == 3  }">
						<div class="colTxt">
							<div class="img">
								<a href="${url:genProductUrl( p.id )}" target="_blank"><img class="lazy" src="http://www.kaijingbao.com/images/grey.gif" data-original='${kjb:genProductListPicUrl(p.id , p.picFilenames)}' width="230"  alt="${ p.name }" /></a>
							</div>
							<h4>
								<c:set var="highName" value="${ out.searchResult.highlighting[p.id]['name'][0]   }"></c:set>
								<a href="${url:genProductUrl( p.id )}" target="_blank">${ empty highName ? p.name : highName } </a>
							</h4>
							<ul>
								<li>市场价：<span>¥ <del>${ p.originalPrice}</del></span></li>
								<li>商城价：<b>¥${ p.price }<font>/件</font></b></li>
								<li>销售量：<i>${ p.salesNum  }件</i></li>
							</ul>
						</div>
					</c:if>
				</c:forEach>
			</div>
		</div>
		
		<!-- 分页 -->
			<c:set var="beginIndex"  value="${ index   }"></c:set>
			<c:set var="resultSize"  value="12"></c:set>
			<c:set var="totalNum"  value="${ out.total}"></c:set>
			<c:set var="curPage"  value="${ (beginIndex/resultSize) - ((beginIndex/resultSize)%1)  + 1 }"></c:set>
			<c:set var="totalPage"  value="${ ((totalNum-1)/resultSize) - (((totalNum-1)/resultSize)%1)  + 1 }"></c:set>
		<c:if test="${ totalPage > 1  }">
		<c:choose>
			<c:when test="${curPage <= 3 }">
				<c:set var="beginPage" value="1"></c:set>
				<c:set var="endPage" value="${(5 < totalPage) ? 5 : totalPage }"></c:set>
			</c:when>
			<c:when test="${curPage + 2 >= totalPage }">
				<c:set var="beginPage" value="${ (5 < totalPage) ? (totalPage - 5) : 1 }"></c:set>
				<c:set var="endPage" value="${totalPage }"></c:set>
			</c:when>
			<c:otherwise>
				<c:set var="beginPage" value="${ curPage - 2 }"></c:set>
				<c:set var="endPage" value="${curPage + 2 }"></c:set>
			</c:otherwise>
		</c:choose>
		<div class="page">
			<c:if test="${ curPage <= 1  }">
				<span class="page-start">上一页</span>
			</c:if>
			<c:if test="${curPage > 1  }">
				<a class="page-pev" href="${ url:genFullSoUrl(category , keywords,properties,minPrice,maxPrice,sort,null,(curPage - 2) * resultSize) }">上一页</a>
			</c:if>
			<c:forEach begin="${ beginPage }" end="${ endPage }" var="p">
			<c:if test="${ p == curPage }">
				<span class="page-this">${ p }</span>
			</c:if>
			<c:if test="${ p != curPage }">
				<a href="${ url:genFullSoUrl(category , keywords,properties,minPrice,maxPrice,sort,null, (p - 1) * resultSize) }">${ p }</a>
			</c:if>
		</c:forEach>
		<c:if test="${ totalPage > endPage }">
			<span class="page-break">...</span>
		</c:if>
		<c:if test="${ curPage < totalPage  }">
			<a class="page-next" href="${ url:genFullSoUrl(category , keywords,properties,minPrice,maxPrice,sort,null,  curPage * resultSize  ) }">下一页</a>
		</c:if>
		<c:if test="${ curPage >= totalPage  }">
			<span class="page-end">下一页</span>
		</c:if>
		</div>
		</c:if>
		<!-- 分页 -->
		
		
		
		
		
	</div>
	<div class="clear"></div>
	
	<!--#include virtual="/html/include/mainFooter.html"-->
	<!--#include virtual="/html/include/js.html"-->
	
	<script type="text/javascript">
		var ps = '${ properties }';
		$('dl.Prop dd').each(function(){
			var dd = $(this);
			$('a:not(.All)' , dd).each(function(){
				var _this = $(this);
				if(ps.indexOf(_this.data('key')) > -1 ){
					$('a',dd).removeClass('this');
					_this.addClass('this');
				}
				var span = _this.find('span');
				if(!span.size() || span.text() <=0 ){
					_this.remove();
				}
			});
		});
		
		$('div.priceBox').hover(function(){
			$('div.price',$(this)).addClass('onprice');
			$('div.btns',$(this)).show();
		},function(){
			$('div.price',$(this)).removeClass('onprice');
			$('div.btns',$(this)).hide();
		});
	</script>


</body>
</html>